package com.xue.pojo.sys;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
//2018-12-28 15:14:49
//tablename:sys_menu
public class SysMenu implements Serializable{
	private static final long serialVersionUID = 1L;
	
	private String id;   //主键
	private String pid;   //父菜单ID
	private Integer orderNo;   //排列序号:只要在同一父级菜单下唯一即可
	private String name;   //菜单名称
	private String link;   //菜单link
	private String resourceType;   //资源类型:1 系统入口菜单 2: 二级或子级页面  3: 按钮或数据权限
	private String enabled;   //是否启用:1 启用  0:禁用
	private Date createDate;   //创建时间
	private String icon;   //菜单图标
	private String routerPath;   //vue 路由名称 path
	private int sysVersion;		//系统版本【0为手机版菜单，1为PC版菜单】
	private List<SysMenu> children;//子菜单 
	private boolean hasChildren=false;
	
	public int getSysVersion() {
		return sysVersion;
	}

	public void setSysVersion(int sysVersion) {
		this.sysVersion = sysVersion;
	}

	public String getId() {
            return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}
	public String getPid() {
            return pid;
	}
	
	public void setPid(String pid) {
		this.pid = pid;
	}
	public Integer getOrderNo() {
            return orderNo;
	}
	
	public void setOrderNo(Integer orderNo) {
		this.orderNo = orderNo;
	}
	public String getName() {
            return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	public String getLink() {
            return link;
	}
	
	public void setLink(String link) {
		this.link = link;
	}
	public String getResourceType() {
            return resourceType;
	}
	
	public void setResourceType(String resourceType) {
		this.resourceType = resourceType;
	}
	public String getEnabled() {
            return enabled;
	}
	
	public void setEnabled(String enabled) {
		this.enabled = enabled;
	}
	public Date getCreateDate() {
            return createDate;
	}
	
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public String getIcon() {
            return icon;
	}
	
	public void setIcon(String icon) {
		this.icon = icon;
	}
	
	public String getRouterPath() {
            return routerPath;
	}
	
	public void setRouterPath(String routerPath) {
		this.routerPath = routerPath;
	}

	public List<SysMenu> getChildren() {
		return children;
	}

	public void setChildren(List<SysMenu> children) {
		this.children = children;
		this.hasChildren=  (null!=this.children && this.children.size()>0);
	}

	
	
	public boolean getHasChildren() {
		return hasChildren;
	}

	@Override
	public String toString() {
		return String.format(
				"SysMenu [id=%s, pid=%s, orderNo=%s, name=%s, link=%s, resourceType=%s, enabled=%s,\r\n children=%s]", id,
				pid, orderNo, name, link, resourceType, enabled, children);
	}
	
	
	
    
}